﻿<local:DocumentBase x:Class="WPFExcelReport.HLTVV06"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                      
                    Loaded="Window_Loaded"
                    Title="HLTVV06"  
                    >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="200" />
            <RowDefinition Height="500" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="2" Orientation="Horizontal">
            <Button Content="刷新数据" Height="30" Margin="0,0,0,0"  Name="btnUpdate" Width="90" Click="btnUpdate_Click"/>
            <TextBlock FontSize="14"  Height="19"   Width="46"  Margin="2,10,0,0" Text="销售单" />
            <TextBox  FontSize="14" Height="24"    Width="96" Name="txtVKPAUFLFD"   Margin="2,10,0,0"  Background="Bisque"/>
            <TextBlock FontSize="14" Height="17"  Width="44"  Text="发货单" Margin="10,10,0,0" />
            <TextBox FontSize="14" Height="25" Width="94" Name="txtVVLIEFSCH" Margin="2,10,0,0" Text=""  />
            <TextBlock FontSize="14" Height="20"  Width="31" Text="颜色" Margin="2,10,0,0" />
            <TextBox FontSize="14" Height="19" Width="47" Name="txtCOLOR" Margin="2,10,0,0" Text=""  />
            <TextBlock FontSize="14" Height="18"  Width="32"  Text="缸号" Margin="10,10,0,0" />
            <TextBox FontSize="14" Height="19" Width="103" Name="txtBatchNo" Margin="2,10,0,0" Text=""  />
            <Button Content="仅生成报表" Height="30" Margin="0,0,0,0"  Name="btnQuery" Width="90" Click="btnQuery_Click"/>
            <Button Content="打印报表" Height="30" Margin="0,0,0,0"  Name="btnPrint" Width="90" Click="btnPrint_Click"/>
            <Button Content="浏览数据" Height="30" Margin="0,0,0,0"  Name="btnPrintPreview" Width="90" Click="btnPrintPreview_Click"/>
        </StackPanel>
        <fd:FilteringDataGrid 
            Grid.Row="1" Grid.RowSpan="2"
            CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=VKPOS}" 
                               Margin="0,2,0,0" 
                               x:Name="VKPOSDataGrid" 
                               SelectionChanged="MainDataGrid_SelectionChanged" >
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="客户" Binding="{Binding KDKUNDNA}"/>
                <DataGridTextColumn Header="销" Binding="{Binding VKPAUFKRS}"/>
                <DataGridTextColumn Header="售" Binding="{Binding VKPAUFLFD}"/>
                <DataGridTextColumn Header="单" Binding="{Binding VKPAUFPOS}"/>
                <DataGridTextColumn Header="品种" Binding="{Binding VKPART}"/>
                <DataGridTextColumn Header="颜色" Binding="{Binding VKPFARBE}"/>
                <DataGridTextColumn Header="数量" Binding="{Binding VKPMENGE1}"/>
                <DataGridTextColumn Header="单位" Binding="{Binding VKPMEEH}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <StackPanel Grid.Row="1" Grid.Column="1" Grid.RowSpan="2" Margin="0,0,0,-2">
            <fd:FilteringDataGrid    
            Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" Height="106" MaxHeight="200"
            CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected"
                               ItemsSource="{Binding Path=VVTLIEF}" 
                               Margin="0,0,0,0" 
                               x:Name="listVVTLIEF" 
                             SelectionChanged="listVVTLIEF_SelectionChanged" 
                             IsSynchronizedWithCurrentItem="False" Opacity="10" Visibility="Visible" >
                <fd:FilteringDataGrid.Columns>
                    <DataGridTextColumn Header="发货单"  Width="80" Binding="{Binding VVTLIEFSCH}"/>
                    <DataGridTextColumn Header="发货单状态" Binding="{Binding STATUS}"/>
                    <DataGridTextColumn Header="运输方式" Binding="{Binding VVVERSART}"/>
                    <DataGridTextColumn Header="承运人" Binding="{Binding VVSPED}"/>
                    <DataGridTextColumn Header="数量（码）" Binding="{Binding QUANTITY}"/>
                    <DataGridTextColumn Header="重量（KG)" Binding="{Binding KG}"/>
                    <DataGridTextColumn Header="发货日期" Binding="{Binding VVVERSDAT}"/>
                    <DataGridTextColumn Header="发货建议号" Binding="{Binding VVAVISNR}"/>
                    <DataGridTextColumn Header="发票号" Binding="{Binding VVTRENR}"/>
                </fd:FilteringDataGrid.Columns>
            </fd:FilteringDataGrid  >
            <TextBox Name="txtConslusion" Height="54" Text="发货信息" Background="YellowGreen"></TextBox>
            <fd:FilteringDataGrid  
                IsFilteringCaseSensitive="False"
                AutoGenerateColumns="False" 
                HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               ItemsSource="{Binding Path=WBBST}" 
                               Margin="0,0,0,0" 
                               x:Name="listWBBST" Height="509">
                <fd:FilteringDataGrid.Columns>
                    <DataGridTextColumn Header="序号" Binding="{Binding CODE}"/>
                    <DataGridTextColumn Header="缸号" Binding="{Binding WBBDPART}"/>
                    <DataGridTextColumn Header="色级" Binding="{Binding WBBTAX}"/>
                    <DataGridTextColumn Header="板号" Binding="{Binding WBBRWLFD}"/>
                    <DataGridTextColumn Header="布卷号" Binding="{Binding WBBSTKNR}"/>
                    <DataGridTextColumn Header="品种" Binding="{Binding WBBART}"/>
                    <DataGridTextColumn Header="变量" Binding="{Binding WBBVAR}"/>
                    <DataGridTextColumn Header="颜色" Binding="{Binding WBBFARBE}"/>
                    <DataGridTextColumn Header="后整理方式" Binding="{Binding WBBBESCHICH}"/>
                    <DataGridTextColumn Header="数量(码)" Binding="{Binding WBBSSTKLG}"/>
                    <DataGridTextColumn Header="重量(KG)" Binding="{Binding WBBSGEW}"/>
                    <DataGridTextColumn Header="质量等级" Binding="{Binding QUALITY}"/>
                </fd:FilteringDataGrid.Columns>
            </fd:FilteringDataGrid  >
        </StackPanel>
    </Grid>
</local:DocumentBase>